﻿@model IEnumerable<VaccineEbook.Models.ChapterModel.ChapterMenuModel>
@{
    Layout = null;
}

<div class="list-group">
    @foreach (var item in Model)
    {
        //if ((string)ViewContext.RouteData.Values["ChapterID"] == item.ChapterID.GetValueOrDefault().ToString())
        if (Request.QueryString["ChapterID"] == item.ChapterID.GetValueOrDefault().ToString())
        {
            // active
            <a href="@Url.Action("Edit", new {id=item.ID, ChapterID=item.ChapterID})" class="list-group-item active">
                <span class="badge">@item.Page</span>
                @item.ChapterGroup
            </a>
        }
        else
        {
            <a href="@Url.Action("Edit", new {id=item.ID, ChapterID=item.ChapterID})" class="list-group-item">
                <span class="badge">@item.Page</span>
                @item.ChapterGroup
            </a>
        }
    }
</div>